/*
 * ==============================================================================
 Name		: MusicInterceptAppUi.cpp
 Author		:  
 Copyrigh	: Your copyright notice
 Description	: CMusicInterceptAppUi implementation
 * ==============================================================================
 */

// INCLUDE FILES
#include <e32std.h>

#include "MusicIntercept.pan"
#include "MusicInterceptAppUi.h"
#include "MusicInterceptView1.h"
#include "MusicInterceptView2.h"

// ========================= MEMBER FUNCTIONS ==================================

// -----------------------------------------------------------------------------
// CMusicInterceptAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CMusicInterceptAppUi::ConstructL()
	{
	// Initialise app UI
	BaseConstructL( EAknEnableSkin);

	iAppView1 = CMusicInterceptView1::NewL();
	iAppView2 = CMusicInterceptView2::NewL();

	// Transfer ownership to base class
	AddViewL( iAppView1);
	AddViewL( iAppView2);

	SetDefaultViewL(*iAppView1);
	}

// -----------------------------------------------------------------------------
// CMusicInterceptAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CMusicInterceptAppUi::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;
		default:
			Panic( EMusicInterceptBasicUi);
			break;
		}
	}

// -----------------------------------------------------------------------------
// CMusicInterceptAppUi::HandleResourceChangeL()
// Called by framework when layout is changed.
// -----------------------------------------------------------------------------
//
void CMusicInterceptAppUi::HandleResourceChangeL(TInt aType)
	{
	CAknAppUi::HandleResourceChangeL(aType);

	if (aType == KEikDynamicLayoutVariantSwitch)
		{
		iAppView1->HandleSizeChange(aType);
		iAppView2->HandleSizeChange(aType);
		}
	}

// End of File
